﻿using SQ.Domain;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SQ.Infrastructure.Mappings
{
    public class IntegrantesFilaMap : EntityTypeConfiguration<IntegranteFila>
    {
        public IntegrantesFilaMap()
        {
            ToTable("TB_INTEGRANTE_FILA");

            HasKey(p => p.Id);

            HasRequired(p => p.Fila);
            HasRequired(p => p.Usuario);

            Property(p => p.DataEntradaFila).IsRequired().HasColumnName("DAT_ENTR_FILA").HasColumnType("DATETIME2");
            Property(p => p.DataSaidaFila).IsOptional().HasColumnName("DAT_SAIDA_FILA").HasColumnType("DATETIME2");
            Property(p => p.IsPreferencial).HasColumnName("IS_PREFERENCIAL");
            Property(p => p.QtdePessoas).IsRequired().HasColumnName("QTDE_PESSOAS");
        }
    }
}
